<template>
  <div class="navbar">
       <el-menu
       router="true"
      default-active="2"
      class="$route.path"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      
      <el-menu-item :index = "item.path" v-for="item in menuList" :key="item.path">
        <i :class="item.icon"></i>
        <span slot="title">{{item.title}}</span>
      </el-menu-item>
    </el-menu>
  
  </div>
</template>

<script>
export default {
  data () {
    return {
       menuList:[
        {
          path: "/home/users",
          icon: "el-icon-s-custom",
          title: "用户管理"
        },
        {
          path: "/home/goods",
          icon: "el-icon-bank-card",
          title: "商品管理"
        },
        {
          path: "/home/orders",
          icon: "el-icon-message-solid",
          title: "订单管理"
        },
        {
          path: "/home/shops",
          icon: "el-icon-menu",
          title: "商铺管理"
        }
      ]
    }
  },

  components: {},

  methods: {}
}
</script>

<style scoped>
</style>